#ifndef __STDCAN_H__
#define __STDCAN_H__

#include "stm32f10x.h"

//EXAMPLE:
//7E0, 8, 03 22 01 45 00 00 00 00
//toyota:
//7E0, 8, 02 21 01 00 00 00 00 00
//7C0, 8, 40 02 21 08 00 00 00 00
typedef struct __std_can {
    uint16_t  tx_id;
    uint8_t   module_id;
    uint8_t   cmd_len;
    uint8_t   cmd;
    uint8_t   sub_cmd;
    uint8_t   id;
    uint16_t  rx_id;
    uint8_t   rx_bytes;
    uint8_t   rx_data[64];
} StdCanData;

void StdCan_init(void);
uint8_t StdCan_ioctl(StdCanData *data);

#endif
